/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/6/12
 * Time: 3:40 AM
 */
Ext.define('Notification', {
    singleton:true,

    warn:function (text, title) {
        title = title ? title : 'Aviso';
        Ext.create('widget.uxNotification', {
            title:title,
            iconCls:'ux-notification-icon-warn',
            html:text
        }).show();
    },

    info:function (text, title) {
        title = title ? title : 'Información';
        Ext.create('widget.uxNotification', {
            title:title,
            iconCls:'ux-notification-icon-info',
            html:text
        }).show();
    },

    error:function (text, title) {
        title = title ? title : 'Error';
        Ext.create('widget.uxNotification', {
            title:title,
            iconCls:'ux-notification-icon-error',
            html:text
        }).show();
    },

    ok:function (text, title) {
        title = title ? title : 'Agregado';
        Ext.create('widget.uxNotification', {
            title:title,
            iconCls:'ux-notification-icon-ok',
            html:text
        }).show();
    }
});